﻿@using Seal.Model
@{
    Report report = Model as Report;
    int cnt = 0;
}
<input type="hidden" autofocus="autofocus" />
@if (report != null)
{
    <div class="dataTables_wrapper">
       <p style="text-align:center;font-weight:bold;">@report.TranslateDisplayName(report.DisplayNameEx)</p>
       <table class="data_table">
            <thead>
                <tr>
                    <th>@report.Repository.TranslateWeb("Name")</th>
                    <th>@report.Repository.TranslateWeb("Type")</th>
                </tr>
            </thead>
            <tbody>
                @foreach (ReportView view in report.Views)
                {
                    <tr class="@((++cnt)%2!=0?"odd":"even")">
                        <td class="row_value">
                            <img src="~/Images/view.png" width="16" height="16" />
                            <a href="InitExecuteReport?Path=@HttpUtility.UrlEncode(report.FilePath.Substring(report.Repository.ReportsFolder.Length))&ViewGUID=@view.GUID" target="_blank" onclick="$(this).blur(); $('#viewOutputDialog').dialog('close');" title="@report.Repository.TranslateWeb("Execute the report view")">@report.TranslateViewName(view.Name)</a>
                        </td>
                        <td class="row_value">@report.Repository.TranslateWeb("View")</td>
                    </tr>
                }
                @foreach (ReportOutput output in report.Outputs)
                {
                    <tr class="@((++cnt)%2!=0?"odd":"even")">
                        <td class ="row_value">
                            <img src="~/Images/device.png" width="16" height="16" />
                            <a href="InitExecuteReport?Path=@HttpUtility.UrlEncode(report.FilePath.Substring(report.Repository.ReportsFolder.Length))&OutputGUID=@output.GUID" target="_blank" onclick="$(this).blur(); $('#viewOutputDialog').dialog('close');" title="@report.Repository.TranslateWeb("Execute the report output")">@report.TranslateOutputName(output.Name)</a>
                        </td>
                        <td class="row_value">@report.Repository.TranslateWeb("Output")</td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
}


